﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Default/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %>
<asp:Content ID="Content1" ContentPlaceHolderID="SystemContent" runat="server">
    <%using (Html.BeginForm())
      { %>
    <div class="pitem" style="margin-top: 25px;">
        <em>请选择宝宝名字的结构：</em>
        <%=Html.DropDownList("NameStruc", ViewData["NameStruc"] as SelectList, new { id = "nameStruc", onchange = "javascript:SetNameStruc();" })%>
        <span class="errors" id="spanusername" style="display: none;"></span>
    </div>
    <div class="matts">
        <span id="spanNameStruc" style="display: none;"></span>
    </div>
    <%} %>
<script type="text/javascript">
    function SetNameStruc() {
        var nameStrucType = jQuery("#nameStruc").val();
        var nameStruc= "";
        switch (nameStrucType) {
            case "1":
                {
                    nameStruc = "智超\n";
                }
                break;
            case "2":
                {
                    nameStruc = "智慧超\n";
                }
                break;
            case "3":
                {
                    nameStruc = "智慧慧\n";
                }
                break;
            case "4":
                {
                    nameStruc = "智*超\n";
                }
                break;
        }
        jQuery("#spanNameStruc").show();
        jQuery("#spanNameStruc").html(nameStruc);
    }
</script>
</asp:Content>
